<?php
namespace app\admin\validate;
use think\Validate;
class Admin extends Validate
{
	protected $rule=[
		'username'=>'require|max:10',
		'password'=>'require'
	];

	protected $message=[
		'username.require'=>'名称必须',
		'username.max'=>'名称不大于10个字符',
		'password.require'=>'密码必须'
	];

	protected $scene=[
		'edit'=>['username'],
		'add'=>['username','password']
	];

}